﻿using System;

namespace GenericConstraints
{
    class Program
    {
        static void Main(string[] args)
        {
            int a = 100;
            var bigData = Max(5, 10);
            Console.WriteLine(bigData);
        }


        static T Max<T>(T a, T b) where T : IComparable<T>
        {
            return a.CompareTo(b) > 0 ? a : b;
        }
    }
}
